home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk69 / jlib20a / jlib.doc < prev    next >
Text File  |  1995-03-19  |  27KB  |  697 lines

  1.  
  2.                                 <<<  jlib  >>>
  3.                              Version  2.0a of jlib
  4.                      A set of Enhancements for AmigaBASIC
  5.                          Copyright © by john everett
  6.                               PeopleLINK ID JAE
  7.                                   321 Hodges
  8.                               Memphis, TN  38111
  9.                                 (901)-452-2560
  10.  
  11. ===============================================================================
  12. jlib (and all its associated files) is (are) Copyright (©) 1989 by john
  13. everett and may be freely distributed providing the following conditions are
  14. met:
  15.  
  16.   1. It is not altered in any way
  17.   2. All files in the original ARCed file are included with the distribution
  18.         or
  19.      If distibuted with an application, the about& requester is either called
  20.      or access to it is provided through menu selection or similar function.
  21.  
  22. Although jlib is not a SHAREWARE program, any and all donations will be MOST
  23. GRATEFULLY accepted, and would most likely result in more and continued
  24. support for jlib.
  25. ===============================================================================
  26. CHANGES/REVISIONS/BUGFIXES:
  27. -Version 2.0a (Thanks to Charles Massey for reporting it & testing fixes)
  28.   Bug in getmem& caused the demo to guru on machines with expanded memory.
  29.   This has been fixed.  Also cleaned up the font routines some. 
  30. ===============================================================================
  31. These commands are an alternative to the BMAPs for accessing the library
  32. routines on the Amiga.  No need to remember which functions need a DECLARE
  33. FUNCTION statement, as none are needed with jlib.  Most do more than just
  34. access the normal library routine, they do the work of some small
  35. subprograms/subroutines.  This saves programming time and program space.
  36. Support is included for many graphics and dos routines, font routines,IFF
  37. picture loading and saving (via the iff.library, which was written by
  38. Christian A. Weber, in Zurich, Switzerland, and is Public Domain!  Thanks,
  39. Christian!), and the ARP file requester (thanks to Charlie Heath and the
  40. other ARP programmers!).  Following you will find instructions for setting
  41. up these routines, and short descriptions of each.
  42. ===============================================================================
  43. READ ALL INSTRUCTIONS CAREFULLY BEFORE USING jlib!!!  THE USE OF SYSTEM
  44. ROUTINES CAN EASILY CAUSE VISITS FROM THE GURU IF ANY MISTAKES ARE MADE!!!
  45. BE CAREFUL!!!
  46. ===============================================================================
  47.  
  48. The first thing you must do is declare all of the function names as
  49. variables.  Next, you DIM an array to hold the loader program, load it in,
  50. and call it.  You may ERASE the array afterwards, as it will no longer be
  51. needed.
  52.  
  53. '========== the jlib variable table - MUST NOT BE ALTERED!!!
  54.   jlib&=0
  55.   about&=0:w7&=0:bye&=0:getmem&=0:freemem&=0:zip&=0:copy&=0:anycmd&=0'jlib/exec
  56.   at&=0:text&=0:printat&=0:shadow&=0:sxy&=0:scolr&=0            'graphics
  57.   sbox&=0:dbox&=0:drawmode&=0:rgb&=0:blowup&=0
  58.   title&=0:autoreq&=0:refresh&=0:setptr&=0:clrptr&=0:sgad&=0    'intuition
  59.   exp1&=0:exp2&=0:exp3&=0:exp4&=0:exp5&=0:exp6&=0:exp7&=0:exp8&=0:exp9&=0
  60.   bload&=0:bsave&=0:openDOS&=0:DOSfile&=0:closeDOS&=0           'dos
  61.   checkfile&=0:request&=0:DOScmd&=0
  62.   loadiff&=0:saveIFF&=0:load8svx&=0:play8svx&=0:kill8svx&=0     'iff/8svx
  63.   loadfont&=0:usefont&=0:killfont&=0:style&=0                   'font
  64.  
  65. '========== these are highly recommended - but not required
  66.   nl$=CHR$(0):nl3$=STRING$(3,0)
  67.  
  68. '========== load and set up the jlib file
  69.   OPEN "jlib.ldr" FOR INPUT AS #1
  70.      mlsize=LOF(1)/2-1:DIM ml(mlsize)
  71.      FOR i=0 TO mlsize:ml(i)=CVI(INPUT$(2,1)):NEXT
  72.   CLOSE #1
  73.   ml&=VARPTR(ml(0)):ml& SADD("jlib2"+nl$),VARPTR(jlib&),WINDOW(7):ERASE ml
  74.  
  75. This short routine reserves some non-relocatable memory, then loads the main
  76. routine, and tells it to initialize itself and the variables to the proper
  77. addresses.  It then returns control to BASIC.  This entire process takes at
  78. most, a couple of seconds, very little of your BASIC program space, and
  79. gives you a LOT of power to dress up and speed up your programs.
  80.  
  81. The best way to start a program using jlib is to start from a copy of
  82. jlib.hdr or a similar start-up file.  This saves typing all the variables,
  83. and ensures you won't have a typo in these important set-up routines.
  84. ===============================================================================
  85.  
  86. NOTES ON USING JLIB:
  87.  
  88. jlib2 IS NOW COMPATIBLE WITH THE AC/BASIC COMPILER!!!  However, it is NOT
  89. compatible with the older version of jlib.  Everything that was possible
  90. with the older version is still possible, but may require a different
  91. calling syntax.  There is much more power available now, so the change
  92. should be worth it!
  93.  
  94. All variables used for passing values to a jlib routine must be INTEGERs
  95. (either short or long) or an error will result.  If the value will contain a
  96. file handle or memory address, it will need to be a LONG INTEGER.
  97.  
  98. If using a jlib command in a SUB program, you must declare the command as a
  99. SHARED variable.  (ex. SHARED shadow&,sxy&,scolr&,bleeb,blurt)
  100.  
  101. ALL STRINGS PASSED TO A jlib ROUTINE MUST BE NULL TERMINATED.  This will not
  102. be mentioned in the command descriptions (I don't want to have to say it
  103. over and over again), so be aware that if you see anything similar to
  104. SADD(msg$), msg$ will need to be NULL terminated (msg$+nl$, or msg$+CHR$(0)).
  105.  
  106. All of the following commands may be called using the syntax given, or with
  107. the alternate form using the CALL keyword (ex. CALL at&(x,y)).  This syntax
  108. MUST be used when calling after the keywords THEN or ELSE, or when used at
  109. the beginning of a line where they might be confused as labels.
  110.  
  111. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  112. The folks at AbSoft have informed me that only the `CALL name&(x,y,z)' form
  113. may be used when calling machine language routines.  On the other hand I've
  114. been using the other form all along with no problems (other than the bug in
  115. the compiler).  WHAT BUG, you say???  There is currently a bug in the
  116. compiler that prevents it from compiling programs that have more than 249
  117. arguments (total) in calls to machine language (like jlib) routines.  They
  118. are working on a fix, but it may not be available until the next compiler
  119. release.  There IS a workaround solution that will allow programs to
  120. compile.  An example program is included in this ARC called `cbug'.  The
  121. demo, however, does not make use of this solution and therefore will not
  122. compile.
  123. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  124.  
  125. All return values will be returned in the jlib& variable unless otherwise
  126. specified.  If this value will be needed at a later time (such as the
  127. address returned when using getmem&), be sure to copy it to another variable
  128. before calling another jlib routine or it will most likely be overwritten!
  129. Examples: memaddress&=jlib&, topaz8&=jlib&, DOShandle&=jlib&
  130. =====================================================================
  131.  
  132. about&
  133.     DESCRIPTION:
  134.       Displays jlib info in system requester.  I ask that programs written
  135.       using jlib have a menu selection (or similar access) that will call
  136.       this item.  This is not required, however.
  137.     INPUT VALUES:
  138.       none
  139.     RETURN VALUES:
  140.       0 for left button pressed
  141.       1 for right button pressed
  142.       (who cares, though)
  143.  
  144. anycmd& offset,d0,d1,d2,d3,d4,d5,d6,d7,a0,a1,a2,a3,a4,a5,a6
  145.     DESCRIPTION:
  146.       Executes any library function.  The library base must be placed in a6
  147.       (exceptions: 0 to 3 may be used as per below).  The routine will place
  148.       all values into their prospective registers and execute the routine at
  149.       offset+a6.  This will enable you to call any library routine not
  150.       directly supported by jlib without using a bmap.
  151.     INPUT VALUES:
  152.       offset=offset into library for desired function
  153.       d0-d7=values to be placed in data registers
  154.       a0-a6=values to be placed in address registers
  155.         If a6 has a value of 0-3 the following library bases will be placed
  156.         in a6.  Otherwise you will have to open the needed library yourself
  157.         (using this command, NOT the basic command) to get the library base
  158.         (in which case you must also close the library).
  159.           0=exec.library
  160.           1=intuition.library
  161.           2=graphics.library
  162.           3=dos.library
  163.     RETURN VALUES:
  164.       -1 if failed completely or the value returned in register d0 (from the
  165.       routine called) will be returned in jlib&
  166.  
  167. at& x,y
  168.     DESCRIPTION:
  169.       Positions the system drawing position at the specified point.  If text
  170.       is printed following this command, it will be positioned with the
  171.       baseline at this point.
  172.     INPUT VALUES:
  173.       x=the x position
  174.       y=the y position
  175.     RETURN VALUES:
  176.       none
  177.  
  178. autoreq& SADD(msg$),SADD(yes$),SADD(no$)
  179.     DESCRIPTION:
  180.       Calls the system AutoRequest() function with the specified text.
  181.     INPUT VALUES:
  182.       msg$=the text for the body of the requester.  This may be up to 17 (if
  183.         I remember right) lines of text.  The lines of text are run together
  184.         with each line terminating in a NULL$ character, and the last line
  185.         teminating with three NULL$ characters (this is what nl3$ was
  186.         declared for at the top of the program).
  187.         EX:msg$="Hello World"+nl$+"Second line!"+nl$+"Something else"+nl3$
  188.         If you want a blank lines, you must put at least three spaces there.
  189.         The size of the requester is determined by the longest text line.
  190.         Experiment!
  191.       yes$=text for positive-response gadget
  192.       no$=text for negative-response gadget
  193.     RETURN VALUES:
  194.       1=positive response
  195.       0=negative response
  196.  
  197. bload& SADD(file$),address,size
  198.     DESCRIPTION:
  199.       Loads a file into the given memory location (address).
  200.     INPUT VALUES:
  201.       file$=the name of the input file
  202.       address=the memory location to load it into
  203.       size=the number of bytes you want loaded
  204.     RETURN VALUES:
  205.       -1=open failed (file probably wasn't found-should have checkfiled :-) !)
  206.       otherwise the actual number of bytes read is returned
  207.  
  208. blowup& sRP,sx,sy,wide,tall,dRP,dx,dy,mag,pwide
  209.     DESCRIPTION:
  210.       Enlarges a graphic element.
  211.     INPUT VALUES:
  212.       sRP=source rastport (WINDOW(8) of source window)
  213.       sx=x position of source element
  214.       sy=y position of source element
  215.       wide=width of source element
  216.       tall=height of source element
  217.       dRP=destination rastport (WINDOW(8) of destination window)
  218.       dx=x position of destination element
  219.       dy=y position of destination element
  220.       mag=magnification factor
  221.       pwide=pixel width of magnified pixels (mag-1 or mag-2 are good)
  222.     RETURN VALUES:
  223.       none
  224.  
  225. bsave& SADD(file$),address,size
  226.     DESCRIPTION:
  227.       Saves a given block of memory (address) to disk (or whatever).
  228.     INPUT VALUES:
  229.       file$=the name of the input file
  230.       address=the memory location of your memory block
  231.       size=the number of bytes you want saved
  232.     RETURN VALUES:
  233.       -1=open failed (file probably wasn't found-should have checkfiled :-) !)
  234.       otherwise the actual number of bytes written is returned
  235.  
  236. bye&
  237.     DESCRIPTION:
  238.       Causes jlib to quit and clean up after itself.  Also releases all
  239.       memory allocated with 0 option of getmem&.
  240.     INPUT VALUES:
  241.       none
  242.     RETURN VALUES:
  243.       none
  244.  
  245. checkfile& SADD(file$)
  246.     DESCRIPTION:
  247.       Checks to see if a file or directory exists.
  248.     INPUT VALUES:
  249.       file$=the name of the file or directory
  250.     RETURN VALUES:
  251.       -1=directory found
  252.        0=not found (or error condition)
  253.        otherwise the value will be the length (in bytes) of the file
  254.  
  255. closeDOS& handle
  256.     DESCRIPTION:
  257.       Closes a file previously opened with openDOS&.
  258.     INPUT VALUES:
  259.       handle=a file handle obtained from openDOS&
  260.     RETURN VALUES:
  261.       none
  262.  
  263. clrptr&
  264.     DESCRIPTION:
  265.       Removes the pointer set with setptr& and returns to the system
  266.       pointer.  Since setptr& only sets a pointer for the current window,
  267.       it may not be necessary to call this routine.  When you close the
  268.       window or exit your program the pointer will be returned to the system
  269.       pointer anyway.
  270.     INPUT VALUES:
  271.       none
  272.     RETURN VALUES:
  273.       none
  274.  
  275. copy& from,to,number,flag
  276.     DESCRIPTION:
  277.       Copies memory from area to another.
  278.     INPUT VALUES:
  279.       from=the source address
  280.       to=the destination address
  281.       number=the number of bytes, words, or long words to be copied
  282.       flag
  283.         4=longword
  284.         2=word
  285.         1=byte
  286.         0=copy until a NULL$ is encountered
  287.     RETURN VALUES:
  288.       none
  289.  
  290. dbox& x,y,SADD(msg$)
  291.     DESCRIPTION:
  292.       Prints text with a two boxes drawn around it.  This can be useful for
  293.       use as gadgets, or to draw attention to certain text.  The text and
  294.       the box outline are drawn with the current foreground color, and the
  295.       inside of the box uses the current background color (specified with
  296.       the COLOR command).  Boxes are sized for whatever the current font is
  297.       automatically.
  298.     INPUT VALUES:
  299.       x=the x position
  300.       y=the y position
  301.       msg$=the text you wish printed
  302.     RETURN VALUES:
  303.       none
  304.  
  305. DOScmd& SADD(command$)
  306.     DESCRIPTION:
  307.       Executes a DOS command.  Works from CLI or WORKBENCH.
  308.     INPUT VALUES:
  309.       command$=the command to be executed
  310.     RETURN VALUES:
  311.       none
  312.  
  313. DOSfile& mode,handle,address/distance,size/seekmode
  314.     DESCRIPTION:
  315.       Performs operation on a previously opened DOS file.
  316.     INPUT VALUES:
  317.       mode
  318.         0=read
  319.         1=write
  320.         2=seek
  321.       handle=a file handle obtained from openDOS&
  322.       address=(read or write mode) the address to read data into
  323.       distance=(seek mode) distance to move pointer (negative moves backwards)
  324.       size=(read or write mode) the number of bytes to read/write
  325.       seekmode (seek mode)
  326.         -1=OFFSET_BEGINNING (measures distance from start of file)
  327.          0=OFFSET_CURRENT (measures distance from current position)
  328.          1=OFFSET_END (measures distance from end of file (a negative value))
  329.     RETURN VALUES:
  330.       read or write mode
  331.         -1 if failed or the number of actual bytes written
  332.       seek mode
  333.         returns position of pointer after execution
  334.         (if distance=0 and mode=0 then it would return the current position)
  335.  
  336. drawmode& mode
  337.     DESCRIPTION:
  338.       Sets the system drawmode.
  339.     INPUT VALUES:
  340.       mode
  341.         0=JAM1
  342.         1=JAM2
  343.         2=COMPLEMENT
  344.         4=INVERSVIDeo
  345.     RETURN VALUES:
  346.       none
  347.  
  348. exp1&, exp2&, exp3&, etc...
  349.     DESCRIPTION:
  350.       Reserved for future additions to jlib
  351.     INPUT VALUES:
  352.       none
  353.     RETURN VALUES:
  354.       none
  355.  
  356. freemem& address
  357.     DESCRIPTION:
  358.       De-allocates memory allocated with getmem& and flag=1.
  359.     INPUT VALUES:
  360.       address=address of the memory block returned when using getmem&.
  361.       Do not call freemem& for memory allocated with the 0 option or the
  362.       GURU will pay a visit!
  363.     RETURN VALUES:
  364.       none
  365.  
  366. getmem& size,type,flag
  367.     DESCRIPTION:
  368.       Allocates system memory for user use.
  369.     INPUT VALUES:
  370.       size=number of bytes of requested memory
  371.       type=the type of memory requested
  372.         MEMF_PUBLIC=1
  373.         MEMF_CHIP=2
  374.         MEMF_FAST=4,
  375.         MEMF_CLEAR=65536
  376.       flag
  377.         0=let jlib de-allocate when cleaning up with bye& command
  378.         1=will de-allocate with freemem&
  379.     RETURN VALUES:
  380.       0 if unsuccessful
  381.       address of memory block if successful
  382.  
  383. killfont& handle
  384.     DESCRIPTION:
  385.       Removes a font from the system font list.
  386.     INPUT VALUES:
  387.       handle=a font handle obtained with loadfont&
  388.     RETURN VALUES:
  389.       none
  390.  
  391. kill8svx&
  392.     DESCRIPTION:
  393.       Not implemented.
  394.     INPUT VALUES:
  395.       none
  396.     RETURN VALUES:
  397.       none
  398.  
  399. load8svx&
  400.     DESCRIPTION:
  401.       Not implemented.
  402.     INPUT VALUES:
  403.       none
  404.     RETURN VALUES:
  405.       none
  406.  
  407. loadfont& SADD(fontname$),fontsize
  408.     DESCRIPTION:
  409.       Loads font data into memory and adds it to the system font list where
  410.       it can be used.
  411.     INPUT VALUES:
  412.       fontname$=name of the requested font
  413.       fontsize=height of the requested font
  414.     RETURN VALUES:
  415.       -1 or 0 if failed otherwise the font handle
  416.  
  417. loadiff& SADD(file$)
  418.     DESCRIPTION:
  419.       Loads an iff picture into a previously opened window.
  420.     INPUT VALUES:
  421.       file$=the filename of the iff picture
  422.     RETURN VALUES:
  423.       -1 if failed or 0 if successful
  424.  
  425. openDOS& mode,SADD(file$)
  426.     DESCRIPTION:
  427.       Opens a DOS file.
  428.     INPUT VALUES:
  429.       mode
  430.         1004=read/write
  431.         1005=read
  432.         1006=write (erases any previous file by same name)
  433.       file$=the name of the file to open
  434.     RETURN VALUES:
  435.       -1 or 0 if failed, otherwise the file handle
  436.  
  437. play8svx&
  438.     DESCRIPTION:
  439.       Not implemented.
  440.     INPUT VALUES:
  441.       none
  442.     RETURN VALUES:
  443.       none
  444.  
  445. printat& x,y,SADD(msg$)
  446.     DESCRIPTION:
  447.       Combines at& and text& to print text at the specified position.  This
  448.       command adjusts for the font baseline so that the x,y position will
  449.       specify the top left corner of the block that will contain the text.
  450.       An additional feature is that if a -1 x value is given, the text will
  451.       be printed centered in the window's current drawing area (this will
  452.       look slightly off-center to the left if the window has a sizing
  453.       gadget).  -2 will right-justify the text.  Text is printed using the
  454.       current colors specified with the COLOR command and the current
  455.       drawmode specified with drawmode&.
  456.     INPUT VALUES:
  457.       x=the x position (-1 to center-justify, or -2 to right-justify)
  458.       y=the y position
  459.       msg$=the text you wish printed
  460.     RETURN VALUES:
  461.       none
  462.  
  463. refresh&
  464.     DESCRIPTION:
  465.       Calls RefreshWindowFrame() to refresh the window frame (makes sense,
  466.       doesn't it?).  Can be used (among other things) to change the window
  467.       frame's color.
  468.       EX: POKE WINDOW(7)+98,textcolor
  469.           POKE WINDOW(7)+99,bordercolor
  470.           refresh&
  471.       If you want to get rid of the window border, just change its color to
  472.       the current background color, call refresh&, and it will disappear!
  473.     INPUT VALUES:
  474.       none
  475.     RETURN VALUES:
  476.       none
  477.  
  478. request& x,y,SADD(greet$),SADD(buffer$),flag
  479.     DESCRIPTION:
  480.       Calls the ARP file requester.
  481.     INPUT VALUES:
  482.       x=the x position of the requester
  483.       y=the y position of the requester
  484.       greet$=text to be printed in title bar of requester
  485.       buffer$=default directory/filename plus enough space to bring it up to
  486.         a sufficient length to accomodate any path/filename.  ARP docs say
  487.         around 360 characters. For instance:
  488.         buffer$="SYS:c/monkeywrench"+STRING$(360,0)
  489.       flag
  490.         0=default color (use for loads)
  491.         1=alternate color (use for saves)
  492.     RETURN VALUES:
  493.       returns the selected path/filename terminated with a NULL character
  494.       then garbage up to the length of buffer$.  See sgad& for an easy
  495.       method of extracting this information to a usable form.
  496.  
  497. rgb& flag,address,start,number
  498.     DESCRIPTION:
  499.       Sets colors to given values or returns current values.  Data may be
  500.       sent/recieved as colortable data or in integer array form.  Color
  501.       tables have the red, green and blue values for each color compressed
  502.       into one WORD (short integer (or two bytes)) size value. Bits 15-12
  503.       will be zeros, 11-8 will hold the red value, 7-4 will hold the green
  504.       value, and 3-0 will hold the blue value for each given color.  The
  505.       color arrays seperate the individual red, green and blue values into
  506.       seperate WORDs.  rgb& 2,VARPTR(colr(0)),1,1 would place the red value
  507.       for color 1 into colr(0), the green value into colr(1), and the blue
  508.       value into colr(2).  These values would be in the range of 0 to 15 and
  509.       would need to be divided by 16 to be used in a PALETTE command.  They
  510.       could be used as-is with the rgb& flag set to 3.
  511.     INPUT VALUES:
  512.       flag=(bit0=get/put off/on, bit1=table/array off/on)
  513.         0=get color table
  514.         1=put color table
  515.         2=get color array
  516.         3=put color array
  517.       address=address to read from (or write to)
  518.       start=starting color number
  519.       number=the number of colors to be read/written
  520.     RETURN VALUES:
  521.       none for write operation
  522.       color values returned starting at address for read operation
  523.  
  524. saveiff& SADD(file$)
  525.     DESCRIPTION:
  526.       Saves the contents of a window as an iff picture file.
  527.     INPUT VALUES:
  528.       file$=the filename to save the iff picture as
  529.     RETURN VALUES:
  530.       -1 if failed or 0 if successful
  531.  
  532. sbox& x,y,SADD(msg$)
  533.     DESCRIPTION:
  534.       Prints shadow text with a box drawn around it.  This can be useful for
  535.       use as gadgets, or to draw attention to certain text.  Text is printed
  536.       using the current scolr& colors. The box outline is drawn with the
  537.       current foreground color, and the inside of the box uses the current
  538.       background color (specified with the COLOR command).  Boxes are
  539.       automatically sized for the current font.
  540.     INPUT VALUES:
  541.       x=the x position
  542.       y=the y position
  543.       msg$=the text you wish printed
  544.     RETURN VALUES:
  545.       none
  546.  
  547. scolr& fg,bg
  548.     DESCRIPTION:
  549.       Sets the colors for the shadow& command.
  550.     INPUT VALUES:
  551.       fg=the text foreground color
  552.       bg=the shadow color
  553.     RETURN VALUES:
  554.       none
  555.  
  556. setptr& image,wide,tall,xoffset,yoffset
  557.     alternate syntax:
  558. setptr& image,-1
  559.     DESCRIPTION:
  560.       Changes the mouse pointer in the current window.  You will need to
  561.       call setptr& for each window you wish the pointer to be active in.
  562.       The alternate syntax may be used if you have the `Prefs' program,
  563.       which saves pointers with a .p suffix.  Just load a .p file into
  564.       memory and call setptr& with the alternate syntax.  This command will
  565.       not automatically load the colors that are stored with a .p file,
  566.       however.  If you wish to use these colors use: rgb& 1,image+74,17,3
  567.     INPUT VALUES:
  568.       image=an intuition image structure which must be in non-relocatable
  569.         memory (use the getmem& command)
  570.       wide=width of pointer (usually (and never exceeding) 16)
  571.       tall=height of pointer
  572.       xoffset=x offset of pointer hot spot
  573.       yoffset=y offset of pointer hot spot
  574.     RETURN VALUES:
  575.       none
  576.  
  577. sgad& x,y,wide,tall,length,flag,SADD(buffer$)
  578.     DESCRIPTION:
  579.       Gets input from a system string (or integer) gadget.  No border is
  580.       drawn around the gadget.  This was done so that you could design a
  581.       screen with a painting program, or use dbox& (or whatever), and not
  582.       have the gadget ruin your graphics.  If a plain border is all thats
  583.       wanted, then a simple LINE (x-1,y-1)-STEP(wide+1,tall+1),colr,b) would
  584.       draw a border around the gadget.  No automatic border seemed to give
  585.       more options in the long run.
  586.     INPUT VALUES:
  587.       x=x position of `hot' area
  588.       y=y position of `hot' area
  589.       wide=width of `hot' area
  590.       tall=height of `hot' area
  591.       length=maximum number of characters in string +1 (for the NULL
  592.         terminator)
  593.       flag (these values may be added (ex: 4+1=centered integer gadget))
  594.         0=left justified text
  595.         1=center justified text
  596.         2=right justified text
  597.         4=integer gadget (only numeric input allowed)
  598.       buffer$=default text plus enough space to bring it up to the length
  599.         given in length.  For instance: buffer$="default"+STRING$(34,0)
  600.         would be sufficient for a maximum length of 41 (actual text length
  601.         would be 40).
  602.     RETURN VALUES:
  603.       buffer$ will contain the string which the user typed terminated with a
  604.         NULL$ and followed by who-knows-what up to the maximum length.  You
  605.         could remove the garbage with a command such as:
  606.           msg$=LEFT$(buffer$,INSTR(buffer$,nl$)-1)
  607.         If you were going to use this to feed something such as a bopenr&
  608.         command or a shadow& command where you need a NULL terminated
  609.         string, you could leave off the `-1' in the previous command and the
  610.         string would still be NULL terminated!
  611.       jlib& will also contain the input value is an integer gadget was
  612.         selected.
  613.  
  614. shadow& x,y,SADD(msg$)
  615.     DESCRIPTION:
  616.       The same as printat& except that text is printed with a dropshadow,
  617.       and the colors are specified with the scolr& command and shadow
  618.       position is specified with the sxy& command.  An additional feature is
  619.       that if a -1 x value is given, the text will be printed centered in
  620.       the window's current drawing area (this will look slightly off-center
  621.       to the left if the window has a sizing gadget).  -2 will right-justify
  622.       the text.
  623.     INPUT VALUES:
  624.       x=the x position (-1 to center-justify, or -2 to right-justify)
  625.       y=the y position
  626.       msg$=the text you wish printed
  627.     RETURN VALUES:
  628.       none
  629.  
  630. style& style
  631.     DESCRIPTION:
  632.       Changes the printing style of the current font.
  633.     INPUT VALUES:
  634.       style (may be added together to combine styles)
  635.         0=normal
  636.         1=underline
  637.         2=bold
  638.         4=italics
  639.     RETURN VALUES:
  640.       none
  641.  
  642. sxy& x,y
  643.     DESCRIPTION:
  644.       Sets shadow position for the shadow& command.
  645.     INPUT VALUES:
  646.       x=shadow x-offset
  647.       y=shadow y-offset
  648.     RETURN VALUES:
  649.       none
  650.  
  651. text& SADD(msg$)
  652.     DESCRIPTION:
  653.       Prints the specified text using the system Text& routine.  This is
  654.       much faster than BASIC's PRINT function and also work with italics
  655.       (while PRINT chops the letters).
  656.     INPUT VALUES:
  657.       msg$=the text you wish printed
  658.     RETURN VALUES:
  659.       none
  660.  
  661. title& SADD(title$)
  662.     DESCRIPTION:
  663.       Changes the text in a window's title bar.
  664.     INPUT VALUES:
  665.       title$=the new text for the title bar
  666.     RETURN VALUES:
  667.       none
  668.  
  669. usefont& handle
  670.     DESCRIPTION:
  671.       Changes the current font.
  672.     INPUT VALUES:
  673.       handle=a font handle obtained with loadfont& - even the default TOPAZ
  674.         font must be opened if you wish  to return to it after another font
  675.     RETURN VALUES:
  676.       none
  677.  
  678. w7& WINDOW(7)
  679.     DESCRIPTION:
  680.       Passes pointer to window struvture to jlib.  jlib MUST have a valid
  681.       value here before calling any graphics-related commands or a GURU is
  682.       imminent.
  683.     INPUT VALUES:
  684.       WINDOW(7)
  685.     RETURN VALUES:
  686.       none
  687.  
  688. zip& address,number,value
  689.     DESCRIPTION:
  690.       Fills a memory block with a given word-sized value.
  691.     INPUT VALUES:
  692.       address=the starting address of the memory block
  693.       number=the number of words to write
  694.       value=the value you wish written
  695.     RETURN VALUES:
  696.       none
  697.